<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>


<c:forEach items="${commentPage.list }" var="comment">
	${comment.content }
	<br/>
	<fmt:formatDate value="${comment.created }" pattern="yyyy-MM-dd"/>
	<hr/>
	
</c:forEach>

<nav aria-label="Page navigation example">
  <ul class="pagination">
    <li class="page-item"><a class="page-link" href="javascript:showComment(1)">首页</a></li>
    
    <c:forEach begin="1" 
        end="${commentPage.pages}" var="page" step="1">
    	<li class="page-item"><a class="page-link" href="javascript:showComment(${page})">${page}</a></li>
     </c:forEach> 
    <li class="page-item"><a class="page-link" href="javascript:showComment(${commentPage.pages})">尾页</a></li>
  </ul>
</nav>